Is it possible to build/link a single recipe with musl if glibc is the default
Hello,
We're building a custom image and using glibc as the standard library. We have a need for a couple recipes that produce binaries that need to be 100% statically linked (using musl). Is this possible to do? Is this achievable with the multilib class? Is there another approach that is worth looking into or is this not possible? It is not desirable in our case to change the default libc to musl, we'd prefer to only use musl in a couple recipes if at all possible.
Thanks,
Kevin
Quoted 3 lines · Kevin via Lists.Yoctoproject.Org
Hello,
We're building a custom image and using glibc as the standard library. We have a need for a couple recipes that produce binaries that need to be 100% statically linked (using musl). Is this possible to do?
Usually, it's not possible to do so.
Quoted 1 line
Is this achievable with the multilib class?
No.
Quoted 1 line
Is there another approach that is worth looking into or is this not possible?
You could look into multiconfig support. That may solve your problem. But it's a little hacky.
Quoted 2 lines
It is not desirable in our case to change the default libc to musl,
we'd prefer to only use musl in a couple recipes if at all possible.
Is it about license? I think it should be the only reason. If not, you may need to reconsider your design.
Another simple option is that you build the statically linked binaries in advance for all archs that you need to support, and then copy them onto the target at rootfs time. I think multiconfig could solve your problem, but I myself haven't tried it out.
Regards,
Chen Qi
Quoted 13 lines
Thanks,
Kevin-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.View/Reply Online (#11835): https://lists.yoctoproject.org/g/poky/message/11835
Mute This Topic: https://lists.yoctoproject.org/mt/61952339/3618072
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-